lib/repo: Search a list of paths in gpgkeypath for gpg keys
authorrfairley <rfairley@redhat.com>
Tue, 6 Nov 2018 20:25:15 +0000 (15:25 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 21 Nov 2018 17:03:10 +0000 (17:03 +0000)
commit05e8c7ef6a86e17a0ac421b9c80a2e57f56b4b3d
treee6a2ba006e5a6ce1e76182ec4373ee6478a48f83
parent244d9a7ec1a08c0c7adf495a8b341798009556e1
lib/repo: Search a list of paths in gpgkeypath for gpg keys

This allows specifying gpgpath as list of
paths that can point to a file or a directory. If a directory path
is given, paths to all regular files in the directory are added
to the remote as gpg ascii keys. If the path is not a directory,
the file is directly added (whether regular file, empty - errors
will be reported later when verifying gpg keys e.g. when pulling).

Adding the gpgkeypath property looks like:

ostree --repo=repo remote add --set=gpgpath="/path/key1.asc,/path/keys.d" R1 https://example.com/some/remote/ostree/repo

Closes #773

Closes: #1773
Approved by: cgwalters
man/ostree.xml
src/libostree/ostree-gpg-verifier.c
src/libostree/ostree-gpg-verifier.h
src/libostree/ostree-repo.c
src/libotutil/ot-keyfile-utils.c
src/libotutil/ot-keyfile-utils.h
tests/test-remote-gpg-import.sh